package com.zsy.demofund.com.controller;

import com.zsy.demofund.test.Test;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class FundController {

    @GetMapping("/queryFund")
    public String queryFund(Model model) {

        // 买入总额
        double M = 3500;

        // 买入费率%
        double P1 = 0.00;

        // 卖出费率%  0.015
        double P2 = 0.015;

        // 涨幅率%
        double Z = 0.023;


        Map<String, Object> compute = new Test().compute(M, P1, P2, Z);



        return String.valueOf(compute);
    }
}
